/***************************************************************************\
 * Copyright (C) by Keio University
 * OpenNISensorDriver.hpp created in 02 2013.
 * Mail : fdesorbi@hvrl.ics.keio.ac.jp
 *
 * OpenNISensorDriver.hpp is part of HVRL Engine Library.
 *
 * The HVRL Engine Library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * The HVRL Engine Library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 \***************************************************************************/

#ifndef HVRL_OPENNI_SENSOR_DRIVER_HPP__
#define HVRL_OPENNI_SENSOR_DRIVER_HPP__

#include "hvrl/sensor/SensorDriver.hpp"

#include <XnCppWrapper.h>

namespace hvrl {

class OpenNISensorDriver: public SensorDriver {
public:

	OpenNISensorDriver(void);

	~OpenNISensorDriver(void);

	bool refresh(void);

	std::string getName(void) const {
		return this->drivername;
	}

	std::vector< std::string > populateSensors(void) const {
		return this->deviceslist;
	}

	unsigned int getNumberOfSensors(void) const {
		return this->numberofdevices;
	}

	xn::Context getContext(void) const {
		return this->context;
	}

private:
	xn::Context context;
	unsigned int numberofdevices;
	bool initialized;
	std::vector< std::string > deviceslist;
	std::string drivername;

};

}

#endif
